home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Util / Icons / DP 1.1s Large.sit / Manual (Part 3) < prev    next >
Encoding:
Text File  |  1992-10-02  |  8.5 KB  |  34 lines  |  [TEXT/ttxt]

  1. 3. Creating Patterns
  2.  
  3. How to Create Your Own Patterns
  4. Desktop Pattern was implemented as a control panel device.  Because it is a control panel and not an application, it is only designed to perform the relatively simple operations involved in changing some specific attribute of the Macintosh environment, namely changing the desktop pattern.  If you would like to add additional patterns to the Desktop Pattern control panel, you must do so with the pasting mechanism discussed in the previous chapter.  Because patterns must conform to specific sizes, it might be useful to illustrate a technique that you can use with any color painting program.  It will allow you to create patterns of the exact sizes needed by Desktop Pattern.  By making the patterns the correct size, you avoid problems inherent with the way Desktop Pattern scales patterns when they are not the proper size.
  5.  
  6. Pattern Template
  7. In the Tutorial folder on the Desktop Pattern diskette you will find a template in ‘PICT’ format that you can import into any graphics program.  It defines the areas for patterns of various sizes from 8x8 pixels to 128x256 as illustrated below in Figure 3.1.  Each box encloses the number of pixels as labeled at the top and left sides.  The gray lines are drawn on the pixels that lie just outside the pattern.  All the white pixels inside each box would, therefore, belong to the pattern.
  8.  
  9. Creating a Pattern
  10. We’ll illustrate some techniques for making the creation of patterns easier by stepping through an example.  We begin by selecting a size for our pattern.  In this example we will be creating a 128x128 pixel pattern.  Our first step is to create a working area for drawing our pattern.  In order to achieve the visual effect of continuity when the pattern is tiled onto the screen, we will create a work area that is 50% larger on each side of the pattern.  This is easily accomplished by duplicating the boxes above and to the left of our desired pattern size and then moving them below and to the right of our pattern.  This gives us a grid as illustrated in Figure 3.2.
  11.  
  12. If you have a paint program that can support multiple layers, the easiest thing to do is to copy this pattern grid into a background layer and then switch to a foreground layer and create a new pattern on top of the template.  If your paint program does not support multiple layers, you must clear out the middle of this grid so that we can create the pattern inside of it.  Leave three or four pixels of the grid near the outer edge of the grid for use in alignment as illustrated in Figure 3.3.
  13.  
  14. Now we can begin drawing our pattern.  Using one of the variations on the spray can tool, we have drawn a number of random lines in our work area (Figure 3.4).  Notice that we have drawn outside of the centermost region of the template which corresponds to the area allocated for the pattern.  By drawing in the ‘overflow’ area, we are making sure that the pattern will match up along the edges when tiled together.  Once we are satisfied with our pattern, we will need to ‘fold’ the overflow areas into the pattern area.
  15.  
  16. Folding in the overflow area is easily accomplished by using the selection marquee in your paint program.  We begin by selecting the overflow area to the right of the pattern.  Since the grid marks that we left behind mark the pixels just outside of our pattern, we need to align the selection marquee to include the pixels that are aligned with the marks.  Make sure that the left side of the selection marquee is lined up on the innermost mark which indicates the boundary of our pattern.  This is illustrated in Figure 3.5.  Now move this selected area horizontally to the left and position it at the left side of the pattern.  Usually you can hold the <SHIFT> key down to constrain motion and ensure that the area is moved in a purely horizontal manner.  In addition, you will want to change the copy mode of your paint program to an additive mode such as OR, ADD, or TRANSPARENT.  This way we can combine the image within the pattern area with the image that we are moving.  In this example we used the OR mode.  When you align the overflow area on top of the pattern area, make sure you align the left edge of the flashing marquee just inside the innermost grid mark on the left side.  This has the effect of copying the column of pixels just outside the pattern on the right onto the leftmost column of pixels within the pattern and, therefore, ensures a continuous image when the final pattern is tiled together on the desktop (Figure 3.6).  You can now repeat this procedure with the overflow area to the left of the pattern (Figures 3.7 and 3.8).  Repeating this procedure with the overflow areas above and below the pattern will complete the pattern (Figure 3.9).
  17.  
  18. Accumulating the overflow areas into the pattern can sometimes leave the center of the pattern a little sparse in comparison to the edges.  This can quickly be remedied by touching up the interior of the pattern using the same techniques used to generate the original pattern.  Make sure that during this touching up process, you stay within the boundaries of the pattern and do not draw into the overflow areas.  If you do, you will need to accumulate the overflow back into the pattern using the techniques just described.  Once you have finished touching up the pattern (Figure 3.10) you will be ready to copy the pattern into the Clipboard using the selection marquee.  Make sure to select all the pixels within the innermost grid marks.  The edges of the selection marquee should be just inside each of the grid marks and not aligned on the marks.  It is usually easiest to align the marquees such that the flashing marquee lies on the outermost pixels of the pattern.  Now copy the image to the Clipboard using the ‘Copy’ command in the Edit menu.  Launch Desktop Pattern and then paste the image using <CMD>V or by selecting ‘Paste’ from the Edit menu.
  19.  
  20. Using Special Effects
  21. Many paint programs provide special effects such as diffusion, blurring, and sharpening.  If you would like to use one of the special effects on your pattern you will need to expand the pattern before you apply the special effect.  This is because many effects determine the value of a given pixel based on the values of its neighbors.  If we were to apply such an effect to the image in Figure 3.10, we would end up with a pattern that wouldn’t tile properly because the pixels at the edges were calculated using neighbors that were all white and not part of the pattern.  In order for the pattern to tile correctly, we need to place pixels from the left side of the pattern next to the right edge of the pattern and visa versa.  Likewise for the top and bottom.
  22.  
  23. The procedure is accomplished by using the selection marquee.  Start by selecting the right half of the pattern (Figure 3.11).  You don’t have to be exact, but you should try to get about half the pattern.  Copy the pattern and place it to the left of the pattern and align it just next to the pattern.  Next select the left half of the pattern.  This time you will need to be more careful.  Use the grid marks to position the marquee so that you only select the pixels that were part of the original pattern and not any of the pixels you just placed.  The left side of the flashing marquee should lie just inside the innermost grid mark (Figure 3.12).  Extending the marquee up near the grid marks helps to make the alignment accurate.  Copy the selection and paste it in to the right of the pattern (Figure 3.13).  Repeat this procedure with the top and bottom of the pattern (Figure 3.14).  
  24.  
  25. Now you can select the entire image and apply the desired special effect (Figure 3.15).  Once you are satisfied with the application of the effect, you need to select the middle part of the image which is in the pattern area.  This can be quite a challenge to attempt directly.  It is much easier to erase the image in the overflow area leaving just the pattern.  Start by selecting the pixels in the overflow area to the right of the pattern (Figure 3.16).  Remember to align the left edge of the flashing marquee with the innermost grid mark.  Now hit <DELETE> or select ‘Cut’ from the edit menu to remove the pixels.  Repeat the procedure and erase the pixels in the left overflow area (Figure 3.17) and the pixels above and below the pattern (Figure 3.18).  You are now ready to select the remaining pixels and then copy them into Desktop Pattern.
  26.  
  27. ©1991 Calico Publishing, All rights reserved.
  28. Calico Publishing, 12751 Woodford Way, Bridgeton, MO  63044-1368
  29. FAX: (314) 298-0767
  30. AppleLink: CALICO
  31. America On-line:: CalicoPubl
  32. CompuServe: 71155,1351
  33. INTERNET: calico@applelink.apple.com
  34.